import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author：刘东
 * @created: 2013-5-9 下午03:50:30 
 * @version：$Id$ 
 * @since:1.0
 * @copyright 
 *
 */

public class IterateMapAndList {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<Map<String, Object>> items = new ArrayList<Map<String, Object>>();
		for (int i = 0; i < 10; i++) {
			Map<String, Object> item = new HashMap<String, Object>();
			item.put("DT_RowId", "1");
			item.put("DT_RowClass", "gradeA");
			item.put("name", "某某专家");// 姓名
			items.add(item);
		}
		Map<String, Object> map = new HashMap<String, Object>();
		for (int i = 0; i < items.size(); i++) {
			//		   System.out.println(i.next()); // line 1   
			System.out.println(i + "" + items.get(i).get("name"));
			map.put(i + "", items.get(i).get("name"));
		}
		System.out.println(map.size());

		Set set = map.keySet();
		for (Iterator iter = set.iterator(); iter.hasNext();) {
			String key = (String) iter.next();
			String value = (String) map.get(key);
			System.out.println(key + "====" + value);
		}

	}

}
